enum Epzn {
    all = 'all',
    positive = 'positive',
    zero = 'zero',
    negative = 'negative',
    positive_or_zero = 'positive | zero',
    negative_or_zero = 'negative | zero',
    not_zero = 'not-zero',
};
interface _CN_ {
    /**
     * 判断是否为可用值
     * @param n 数字
     * @param pzn <'all'> 正负性
     * @returns true: 可用值; false: 不可用值;
     */
    isValue(n: number, pzn?: Epzn): boolean;
}
{
    Object.defineProperty(_CN_.prototype, 'isValue', {
        writable: false,
        configurable: false,
        enumerable: false,
        value: function (n: any, pzn = Epzn.all) {
            if (Number.isNaN(n)) { return false; }
            if (!Number.isFinite(n)) { return false; }
            switch (pzn) {
                case Epzn.all: return true;
                case Epzn.positive: return n > 0;
                case Epzn.zero: return n == 0;
                case Epzn.negative: return n < 0;
                case Epzn.positive_or_zero: return n >= 0;
                case Epzn.negative_or_zero: return n <= 0;
                case Epzn.not_zero: return n != 0;
            }
        }
    });
}
